[This topic is part of the Microsoft Azure Storage Client Library 1.7, which has been deprecated. See Storage Client Library for the latest version.]
Gets an enumerable collection of results. Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)
Gets an enumerable collection of results. Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)
Usage
| Visual Basic |
|---|
Dim instance As ResultSegment(Of TElement) Dim value As IEnumerable(Of TElement) value = instance.Results |
Syntax
| Visual Basic |
|---|
Public Property Results As IEnumerable(Of TElement) |
| C# |
|---|
public IEnumerable<TElement> Results { get; } |
| C++ |
|---|
public: property IEnumerable<TElement>^ Results { IEnumerable<TElement>^ get (); } |
| J# |
|---|
| JScript |
|---|
Property Value
Type: System.Collections.Generic.IEnumerable An enumerable collection of results.
Example
The following example lists the blobs in a container in result segments. The first operation returns
Copy Code | |
|---|---|
static void ListBlobsInContainerInSegments()
{
//Create service client for credentialed access to the Blob service.
CloudBlobClient blobClient = new CloudBlobClient("http://storagesample.blob.core.windows.net/",
new StorageCredentialsAccountAndKey("storagesample",
"m4AHRkXjfhly2rE2YN/hcUR4U2lkGdCmj2/1ISutZKl+OqlrZN98Mhzq/U2AHYJT992tLmrkFW+mQgw9loIVCg=="));
//Get a reference to a container that contains lots of blobs.
CloudBlobContainer container = blobClient.GetContainerReference("lotsofblobs");
//Return blobs using a flat listing.
BlobRequestOptions options = new BlobRequestOptions();
options.UseFlatBlobListing = true;
//This first operation will return up to 5000 blobs.
ResultSegment<IListBlobItem> resultSegment = container.ListBlobsSegmented(options);
foreach (var blobItem in resultSegment.Results)
{
Console.WriteLine(blobItem.Uri);
}
ResultContinuation continuationToken = resultSegment.ContinuationToken;
//Check whether there are more results and list them in pages of 1000.
while (continuationToken != null)
{
resultSegment = container.ListBlobsSegmented(1000, continuationToken, options);
foreach (var blobItem in resultSegment.Results)
{
Console.WriteLine(blobItem.Uri);
}
continuationToken = resultSegment.ContinuationToken;
}
}
| |
Remarks
The Results property contains the collection of results returned by an operation that returns a result segment. You can use the Results property to enumerate the results.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.